import sys,os

new_tr = sys.argv[1]
old_tr = sys.argv[2]
qwe = sys.argv[3]

f = open(qwe,mode="r",encoding="utf-8")
f_new = open("syan_new",mode="w",encoding="utf-8")
for i in f:
    if old_tr in i:
        i = i.replace(old_tr,new_tr)
    f_new.write(i)

f.close()
f_new.close()
os.remove("syan")
os.rename("syan_new","syan")





